<template>
	<page-meta :root-font-size="aStore.rootFont"></page-meta>
    <z-paging ref="paging" v-model="data.dataList" @query="queryList" :refresher-enabled="false">
    	<template v-slot:top>
    		<u-navbar title="" :fixed="false" :leftIcon="vk.myfn.hideHome()? 'arrow-left' : 'home-fill'" :leftIconSize="24" :bgColor="appConfig.navbar.backgroundColor" :leftIconColor="appConfig.navbar.color" :titleStyle="{color: appConfig.navbar.color}" @leftClick="vk.myfn.pageBack()">
    		</u-navbar>
    	</template>
    </z-paging>
</template>

<script lang="ts" setup>
import { ref, computed, reactive } from "vue"
import { onShow, onLoad } from "@dcloudio/uni-app";

import { appStore } from "@/store/appStore";
import { Result, ResultError } from "@/common/protocol/nineth";
import {  } from "@/common/http/request";

const vk = uni.vk;
const aStore = appStore();
const paging = ref<any>(null)
const data = reactive({
	dataList: []
});

function queryList(pageIndex: number, pageSize: number){
	
	vk.callFunction({
	  url: 'client/user/kh/ugc.getUgcSessionListByType',
	  title: '请求中...',
	  data: {
	    pageIndex,
		pageSize
	  },
	  success: (data: Result) => {
	    paging.value.complete(data.rows);
	  },
	  fail: (err: ResultError) => {
	    paging.value.complete(false);
	  }
	});
	
}

const appConfig = computed(()=>{
	return aStore.getAppConfig;
})

onLoad((opts: any)=>{
	
		
})

</script>
